
#ifndef GLOBALSENSOR_TC_STORE_H_
#define GLOBALSENSOR_TC_STORE_H_

#include <public/PackMemManager.h>
#include <public/ssi_link_layer.h>
#include <public/sgi_link_layer.h>

class CGlobalSensorTCStore {

CPackListHandler m_freePackList;
//CPackListHandler m_sensorTCPackList[255];

//methods…
//CPackListHandler m_sensorTCPackList[255];
uint16_t m_sensorID[255];

public:
CPackListHandler m_sensorTCPackList[255];
//uint16_t m_sensorID[255];


void add_free_pack_list(CPackListHandler &packList);
void get_free_pack_list(CPackListHandler &packList);
uint16_t get_free_pack_list_number();
int16_t check_next_packed_sensor_tc (int16_t sensor_id);
int16_t get_free_sensor_tc_list_index();
bool get_next_ssi_sen_tc_frame_info( int16_t sensor_id,struct ssi_link_layer_data_frame_info_t&frame_info);
bool delete_packed_tc_head(uint16_t sensor_id);
bool store_sen_tc_frame(struct sgi_link_layer_sen_tc_frame_t  &sen_tc_frame);
bool frameCanBeStoredInPack(uint8_t pos, struct sgi_link_layer_sen_tc_frame_t  &sen_tc);
//int8_t CGlobalSensorTCStore::LastTCOfFrame(uint8_t index, struct sgi_link_layer_sen_tc_frame_t  &sen_tc);
int8_t LastTCOfFrame(uint8_t index, struct sgi_link_layer_sen_tc_frame_t  &sen_tc);
void StoreInPackets();
void RecoverData();
uint64_t fileSize( const char* filePath );
protected:

};

#endif
